<template>
  <div>
    <h1>App</h1>
    vuex4.0 --- {{ $store.state.app.title }}
    <br />
    pinia ---{{ store.count }}
    <br />
    <button @click="increment">+</button>
    <Child></Child>
  </div>
</template>
<script setup>
import { useCounterStore } from '@/stores/counter';

const store = useCounterStore();
// console.log(store.count);
const increment = () => {
  // store.increment();
  store.$patch({
    count: (store.count += 1),
  });
};
</script>
